package com.hospital.hospitaldrugservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import java.io.Serializable;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 药品表
 * </p>
 *
 * @author 王晓康
 * @since 2020-10-20
 */
@Data
@Accessors(chain = true)
public class Drug extends Model<Drug> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String drugnumber;

    private String name;

    private Integer drugtypeId;

    private String specification;

    private Integer venderId;

    private Integer stock;

    private Double outprice;

    private Double inprice;

    private Integer drugstatusId;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createtime;


    private String drugtypename;
    private String drugstatus;
    //生产厂商名称
    private String venderName;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
